package edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseController;

import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseDao.CameraDataDAO;
import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseEntity.CameraData;
import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseService.CameraDataService;
import edu.ynu.se.xiecheng.achitectureclass.common.controller.LogicController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "摄像头数据管理")
@RestController
@RequestMapping("/camera")
public class CameraDataController extends LogicController<CameraDataService, CameraDataDAO, CameraData, Long> {
    public CameraDataController(CameraDataService service) {
        super(service);
    }

    @GetMapping("/get")

    @ApiOperation(value = "通过ID获取摄像头数据", notes = "根据摄像头数据ID获取摄像头数据")

    public CameraData GET(@RequestParam Long id) {

        return service.GET(id);

    }
}
